
<#include "/common/head.html"/>


 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">

            <tr>
           		<th><span id="userlevel_label">会员等级：</span></th>
               	<td>
               		<div class="wrap_input"><input id="userlevel" name="userlevel" id="userlevel" readonly="readonly" class="easyui-combobox" value="${model.userlevel!''}" data-options="
               				required:true,
               				valueField: 'id',
        					textField: 'text',
        					fit: true,
        					data:[
        						{id:'', text:''}<#list dictDatauserlevel.keySet() as key>,{id:'${key}', text:'${dictDatauserlevel.get(key)}'}</#list>
	               			]
               		"/></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="enter_times_label">可抽奖次数（0为不限）：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="enter_times" id="enter_times" value="${model.enter_times!''}" data-options="fit: true,required:true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="goal_times_label">最大中奖次数（0为不限）：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="goal_times" id="goal_times" value="${model.goal_times!''}" data-options="fit: true,required:true"></input></div>
           		</td>
           		
            </tr>
        </table>
    </form>
</div>
<script>

top.window.subPage.save = save;
function save() {
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {
			if(data.result == "success") {
				top.window.closeWindow();
				top.window.subPage.loadCurrDatagrid();
			}
		});
	}
}
function getParam() {
	var param = {
	     
	    "id": ${model.id},
        "model.gameid": ${model.gameid},
       	    "model.userlevel": getInputValue("userlevel"), 
       	    "model.enter_times": getInputValue("enter_times"), 
       	    "model.goal_times": getInputValue("goal_times"), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
